try:
    import mongomock as mongo
except ImportError:
    import pymongo as mongo

from bson.objectid import ObjectId

client = mongo.MongoClient('mongodb://localhost')
db = client.test

# 添加索引
db.profiles.create_index('user_id')

print(db.profiles.index_infomation())
